﻿using System.Globalization;

namespace CountryLookup
{
    public class Country
    {
        public string CountryCode;
        public string CountryName;
        public float Longitude;
        public float Latitude;

        public Country(string countryCode, string countryName, float latitude, float longitude)
        //public Country(string countryCode, float latitude, float longitude)
        {
            CountryCode = countryCode;
            CountryName = countryName;
            Longitude = longitude;
            Latitude = latitude;
        }

        public override string ToString()
        {
            return string.Format("Country code: {0} Latitude: {1} Longitude: {2}", CountryCode, Latitude, Longitude);
        }

        public static Country[] Countries = new[] {   
            new Country("--", "N/A", 0f, 0f),
            new Country("AP", "Asia/Pacific Region", 35f, 105f),
            new Country("EU", "Europe", 47f, 8f),
            new Country("AD", "Andorra", 42.5f, 1.5f),
            new Country("AE", "United Arab Emirates", 24f, 54f),
            new Country("AF", "Afghanistan", 33f, 65f),
            new Country("AG", "Antigua and Barbuda", 17.05f, -61.8f),
            new Country("AI", "Anguilla", 18.25f, -63.1667f),
            new Country("AL", "Albania", 41f, 20f),
            new Country("AM", "Armenia", 40f, 45f),
            new Country("AN", "Netherlands Antilles", 12.25f, -68.75f),
            new Country("AO", "Angola", -12.5f, 18.5f),
            new Country("AQ", "Antarctica", -90f, 0f),
            new Country("AR", "Argentina", -34f, -64f),
            new Country("AS", "American Samoa", -14.3333f, -170f),
            new Country("AT", "Austria", 47.3333f, 13.3333f),
            new Country("AU", "Australia", -27f, 133f),
            new Country("AW", "Aruba", 12.5f, -69.9667f),
            new Country("AZ", "Azerbaijan", 40.5f, 47.5f),
            new Country("BA", "Bosnia and Herzegovina", 44f, 18f),
            new Country("BB", "Barbados", 13.1667f, -59.5333f),
            new Country("BD", "Bangladesh", 24f, 90f),
            new Country("BE", "Belgium", 50.8333f, 4f),
            new Country("BF", "Burkina Faso", 13f, -2f),
            new Country("BG", "Bulgaria", 43f, 25f),
            new Country("BH", "Bahrain", 26f, 50.55f),
            new Country("BI", "Burundi", -3.5f, 30f),
            new Country("BJ", "Benin", 9.5f, 2.25f),
            new Country("BM", "Bermuda", 32.3333f, -64.75f),
            new Country("BN", "Brunei Darussalam", 4.5f, 114.6667f),
            new Country("BO", "Bolivia", -17f, -65f),
            new Country("BR", "Brazil", -10f, -55f),
            new Country("BS", "Bahamas", 24.25f, -76f),
            new Country("BT", "Bhutan", 27.5f, 90.5f),
            new Country("BV", "Bouvet Island", -54.4333f, 3.4f),
            new Country("BW", "Botswana", -22f, 24f),
            new Country("BY", "Belarus", 53f, 28f),
            new Country("BZ", "Belize", 17.25f, -88.75f),
            new Country("CA", "Canada", 60f, -95f),
            new Country("CC", "Cocos (Keeling) Islands", -12.5f, 96.8333f),
            new Country("CD", "Congo, The Democratic Republic of the", 0f, 25f),
            new Country("CF", "Central African Republic", 7f, 21f),
            new Country("CG", "Congo", -1f, 15f),
            new Country("CH", "Switzerland", 47f, 8f),
            new Country("CI", "Cote D'Ivoire", 8f, -5f),
            new Country("CK", "Cook Islands", -21.2333f, -159.7667f),
            new Country("CL", "Chile", -30f, -71f),
            new Country("CM", "Cameroon", 6f, 12f),
            new Country("CN", "China", 35f, 105f),
            new Country("CO", "Colombia", 4f, -72f),
            new Country("CR", "Costa Rica", 10f, -84f),
            new Country("CU", "Cuba", 21.5f, -80f),
            new Country("CV", "Cape Verde", 16f, -24f),
            new Country("CX", "Christmas Island", -10.5f, 105.6667f),
            new Country("CY", "Cyprus", 35f, 33f),
            new Country("CZ", "Czech Republic", 49.75f, 15.5f),
            new Country("DE", "Germany", 51f, 9f),
            new Country("DJ", "Djibouti", 11.5f, 43f),
            new Country("DK", "Denmark", 56f, 10f),
            new Country("DM", "Dominica", 15.4167f, -61.3333f),
            new Country("DO", "Dominican Republic", 19f, -70.6667f),
            new Country("DZ", "Algeria", 28f, 3f),
            new Country("EC", "Ecuador", -2f, -77.5f),
            new Country("EE", "Estonia", 59f, 26f),
            new Country("EG", "Egypt", 27f, 30f),
            new Country("EH", "Western Sahara", 24.5f, -13f),
            new Country("ER", "Eritrea", 15f, 39f),
            new Country("ES", "Spain", 40f, -4f),
            new Country("ET", "Ethiopia", 8f, 38f),
            new Country("FI", "Finland", 64f, 26f),
            new Country("FJ", "Fiji", -18f, 175f),
            new Country("FK", "Falkland Islands (Malvinas)", -51.75f, -59f),
            new Country("FM", "Micronesia, Federated States of", 6.9167f, 158.25f),
            new Country("FO", "Faroe Islands", 62f, -7f),
            new Country("FR", "France", 46f, 2f),
            new Country("GA", "Gabon", -1f, 11.75f),
            new Country("GB", "United Kingdom", 54f, -2f),
            new Country("GD", "Grenada", 12.1167f, -61.6667f),
            new Country("GE", "Georgia", 42f, 43.5f),
            new Country("GF", "French Guiana", 4f, -53f),
            new Country("GH", "Ghana", 8f, -2f),
            new Country("GI", "Gibraltar", 36.1833f, -5.3667f),
            new Country("GL", "Greenland", 72f, -40f),
            new Country("GM", "Gambia", 13.4667f, -16.5667f),
            new Country("GN", "Guinea", 11f, -10f),
            new Country("GP", "Guadeloupe", 16.25f, -61.5833f),
            new Country("GQ", "Equatorial Guinea", 2f, 10f),
            new Country("GR", "Greece", 39f, 22f),
            new Country("GS", "South Georgia and the South Sandwich Islands", -54.5f, -37f),
            new Country("GT", "Guatemala", 15.5f, -90.25f),
            new Country("GU", "Guam", 13.4667f, 144.7833f),
            new Country("GW", "Guinea-Bissau", 12f, -15f),
            new Country("GY", "Guyana", 5f, -59f),
            new Country("HK", "Hong Kong", 22.25f, 114.1667f),
            new Country("HM", "Heard Island and McDonald Islands", -53.1f, 72.5167f),
            new Country("HN", "Honduras", 15f, -86.5f),
            new Country("HR", "Croatia", 45.1667f, 15.5f),
            new Country("HT", "Haiti", 19f, -72.4167f),
            new Country("HU", "Hungary", 47f, 20f),
            new Country("ID", "Indonesia", -5f, 120f),
            new Country("IE", "Ireland", 53f, -8f),
            new Country("IL", "Israel", 31.5f, 34.75f),
            new Country("IN", "India", 20f, 77f),
            new Country("IO", "British Indian Ocean Territory", -6f, 71.5f),
            new Country("IQ", "Iraq", 33f, 44f),
            new Country("IR", "Iran, Islamic Republic of", 32f, 53f),
            new Country("IS", "Iceland", 65f, -18f),
            new Country("IT", "Italy", 42.8333f, 12.8333f),
            new Country("JM", "Jamaica", 18.25f, -77.5f),
            new Country("JO", "Jordan", 31f, 36f),
            new Country("JP", "Japan", 36f, 138f),
            new Country("KE", "Kenya", 1f, 38f),
            new Country("KG", "Kyrgyzstan", 41f, 75f),
            new Country("KH", "Cambodia", 13f, 105f),
            new Country("KI", "Kiribati", 1.4167f, 173f),
            new Country("KM", "Comoros", -12.1667f, 44.25f),
            new Country("KN", "Saint Kitts and Nevis", 17.3333f, -62.75f),
            new Country("KP", "Korea, Democratic People's Republic of", 40f, 127f),
            new Country("KR", "Korea, Republic of", 37f, 127.5f),
            new Country("KW", "Kuwait", 29.3375f, 47.6581f),
            new Country("KY", "Cayman Islands", 19.5f, -80.5f),
            new Country("KZ", "Kazakstan", 48f, 68f),
            new Country("LA", "Lao People's Democratic Republic", 18f, 105f),
            new Country("LB", "Lebanon", 33.8333f, 35.8333f),
            new Country("LC", "Saint Lucia", 13.8833f, -61.1333f),
            new Country("LI", "Liechtenstein", 47.1667f, 9.5333f),
            new Country("LK", "Sri Lanka", 7f, 81f),
            new Country("LR", "Liberia", 6.5f, -9.5f),
            new Country("LS", "Lesotho", -29.5f, 28.5f),
            new Country("LT", "Lithuania", 56f, 24f),
            new Country("LU", "Luxembourg", 49.75f, 6.1667f),
            new Country("LV", "Latvia", 57f, 25f),
            new Country("LY", "Libyan Arab Jamahiriya", 25f, 17f),
            new Country("MA", "Morocco", 32f, -5f),
            new Country("MC", "Monaco", 43.7333f, 7.4f),
            new Country("MD", "Moldova, Republic of", 47f, 29f),
            new Country("MG", "Madagascar", -20f, 47f),
            new Country("MH", "Marshall Islands", 9f, 168f),
            new Country("MK", "Macedonia", 41.8333f, 22f),
            new Country("ML", "Mali", 17f, -4f),
            new Country("MM", "Myanmar", 22f, 98f),
            new Country("MN", "Mongolia", 46f, 105f),
            new Country("MO", "Macau", 22.1667f, 113.55f),
            new Country("MP", "Northern Mariana Islands", 15.2f, 145.75f),
            new Country("MQ", "Martinique", 14.6667f, -61f),
            new Country("MR", "Mauritania", 20f, -12f),
            new Country("MS", "Montserrat", 16.75f, -62.2f),
            new Country("MT", "Malta", 35.8333f, 14.5833f),
            new Country("MU", "Mauritius", -20.2833f, 57.55f),
            new Country("MV", "Maldives", 3.25f, 73f),
            new Country("MW", "Malawi", -13.5f, 34f),
            new Country("MX", "Mexico", 23f, -102f),
            new Country("MY", "Malaysia", 2.5f, 112.5f),
            new Country("MZ", "Mozambique", -18.25f, 35f),
            new Country("NA", "Namibia", -22f, 17f),
            new Country("NC", "New Caledonia", -21.5f, 165.5f),
            new Country("NE", "Niger", 16f, 8f),
            new Country("NF", "Norfolk Island", -29.0333f, 167.95f),
            new Country("NG", "Nigeria", 10f, 8f),
            new Country("NI", "Nicaragua", 13f, -85f),
            new Country("NL", "Netherlands", 52.5f, 5.75f),
            new Country("NO", "Norway", 62f, 10f),
            new Country("NP", "Nepal", 28f, 84f),
            new Country("NR", "Nauru", -0.5333f, 166.9167f),
            new Country("NU", "Niue", -19.0333f, -169.8667f),
            new Country("NZ", "New Zealand", -41f, 174f),
            new Country("OM", "Oman", 21f, 57f),
            new Country("PA", "Panama", 9f, -80f),
            new Country("PE", "Peru", -10f, -76f),
            new Country("PF", "French Polynesia", -15f, -140f),
            new Country("PG", "Papua New Guinea", -6f, 147f),
            new Country("PH", "Philippines", 13f, 122f),
            new Country("PK", "Pakistan", 30f, 70f),
            new Country("PL", "Poland", 52f, 20f),
            new Country("PM", "Saint Pierre and Miquelon", 46.8333f, -56.3333f),
            new Country("PR", "Puerto Rico", 18.25f, -66.5f),
            new Country("PS", "Palestinian Territory", 32f, 35.25f),
            new Country("PT", "Portugal", 39.5f, -8f),
            new Country("PW", "Palau", 7.5f, 134.5f),
            new Country("PY", "Paraguay", -23f, -58f),
            new Country("QA", "Qatar", 25.5f, 51.25f),
            new Country("RE", "Reunion", -21.1f, 55.6f),
            new Country("RO", "Romania", 46f, 25f),
            new Country("RU", "Russian Federation", 60f, 100f),
            new Country("RW", "Rwanda", -2f, 30f),
            new Country("SA", "Saudi Arabia", 25f, 45f),
            new Country("SB", "Solomon Islands", -8f, 159f),
            new Country("SC", "Seychelles", -4.5833f, 55.6667f),
            new Country("SD", "Sudan", 15f, 30f),
            new Country("SE", "Sweden", 62f, 15f),
            new Country("SG", "Singapore", 1.3667f, 103.8f),
            new Country("SH", "Saint Helena", -15.9333f, -5.7f),
            new Country("SI", "Slovenia", 46f, 15f),
            new Country("SJ", "Svalbard and Jan Mayen", 78f, 20f),
            new Country("SK", "Slovakia", 48.6667f, 19.5f),
            new Country("SL", "Sierra Leone", 8.5f, -11.5f),
            new Country("SM", "San Marino", 43.7667f, 12.4167f),
            new Country("SN", "Senegal", 14f, -14f),
            new Country("SO", "Somalia", 10f, 49f),
            new Country("SR", "Suriname", 4f, -56f),
            new Country("ST", "Sao Tome and Principe", 1f, 7f),
            new Country("SV", "El Salvador", 13.8333f, -88.9167f),
            new Country("SY", "Syrian Arab Republic", 35f, 38f),
            new Country("SZ", "Swaziland", -26.5f, 31.5f),
            new Country("TC", "Turks and Caicos Islands", 21.75f, -71.5833f),
            new Country("TD", "Chad", 15f, 19f),
            new Country("TF", "French Southern Territories", -43f, 67f),
            new Country("TG", "Togo", 8f, 1.1667f),
            new Country("TH", "Thailand", 15f, 100f),
            new Country("TJ", "Tajikistan", 39f, 71f),
            new Country("TK", "Tokelau", -9f, -172f),
            new Country("TM", "Turkmenistan", 40f, 60f),
            new Country("TN", "Tunisia", 34f, 9f),
            new Country("TO", "Tonga", -20f, -175f),
            new Country("TR", "Turkey", 39f, 35f),
            new Country("TT", "Trinidad and Tobago", 11f, -61f),
            new Country("TV", "Tuvalu", -8f, 178f),
            new Country("TW", "Taiwan", 23.5f, 121f),
            new Country("TZ", "Tanzania, United Republic of", -6f, 35f),
            new Country("UA", "Ukraine", 49f, 32f),
            new Country("UG", "Uganda", 1f, 32f),
            new Country("UM", "United States Minor Outlying Islands", 19.2833f, 166.6f),
            new Country("US", "United States", 38f, -97f),
            new Country("UY", "Uruguay", -33f, -56f),
            new Country("UZ", "Uzbekistan", 41f, 64f),
            new Country("VA", "Holy See (Vatican City State)", 41.9f, 12.45f),
            new Country("VC", "Saint Vincent and the Grenadines", 13.25f, -61.2f),
            new Country("VE", "Venezuela", 8f, -66f),
            new Country("VG", "Virgin Islands, British", 18.5f, -64.5f),
            new Country("VI", "Virgin Islands, U.S.", 18.3333f, -64.8333f),
            new Country("VN", "Vietnam", 16f, 106f),
            new Country("VU", "Vanuatu", -16f, 167f),
            new Country("WF", "Wallis and Futuna", -13.3f, -176.2f),
            new Country("WS", "Samoa", -13.5833f, -172.3333f),
            new Country("YE", "Yemen", 15f, 48f),
            new Country("YT", "Mayotte", -12.8333f, 45.1667f),
            new Country("RS", "Serbia", 44f, 21f),
            new Country("ZA", "South Africa", -29f, 24f),
            new Country("ZM", "Zambia", -15f, 30f),
            new Country("ME", "Montenegro", 42f, 19f),
            new Country("ZW", "Zimbabwe", -20f, 30f),

        };
    }
}
